package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class TicketsPage extends BasePage {
    private static final String URL_TICKETS = "http://rozetka.com.ua/travel/";
    private static final By pageTickets = By.xpath("//*[@id='fatmenu_14']/div/a");

    public TicketsPage(WebDriverWrapper driver) {
        super(driver, URL_TICKETS);
    }

    public void open() {
        driver.findElement(pageTickets).click();
        if (driver.getCurrentUrl().equals(URL_TICKETS)) {
            Log4Test.info("Page tickets is opened");
        } else {
            Log4Test.error("Page tickets isn't opened");
        }
    }

}
